
import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useOrderTypeStore = defineStore('orderType', () => {
	// 定义状态
	const orderTypeMap = ref({
		'UN_PAID':'待付款',
		'TO_SHIP':'待发货',
		'TO_RECEIVED':'待收货',
		'COMPLETED':'已完成',
		'CANCELLATION':'已取消',
		'RETURN':'退款/退货'
	});
	
	const orderTypeMapArr = ref([
		{key:"",title:"全部"},
		{key:'UN_PAID',title:"待付款"},
		{key:'TO_SHIP',title:"待发货"},
		{key:'TO_RECEIVED',title:"待收货"},
		{key:'COMPLETED',title:"已完成"},
		{key:'RETURN',title:"退款/退货"},
	]);
	// 返回状态和函数，以便在组件中使用
	return {
		orderTypeMap,
		orderTypeMapArr
	};
});